/*
 * =====================================================================================
 *
 *       Filename:  World.h
 *
 *    Description:  header of World class
 *
 *        Version:  1.0
 *        Created:  01/05/12 02:01:53
 *       Revision:  none
 *       Compiler:  g++
 *
 *         Author:  LittleQ Su (), 98703060@nccu.edu.tw
 *        Company:  National Chengchi University, The Department of Computer Science
 *
 * =====================================================================================
 */
#ifndef __WORLD_H__
#define __WORLD_H__
#include "Headers.h"
#include "RandomNum.h"
#include "Creature.h"

class World {
public:
    World(int pass_times, int seed);
    ~World();

    void mainLoop(int);
    void printWorld() const;
    void cleanWorld();
    void action();
    void init();

    int getRandom(int low, int high);

    bool addCreature( enum CREATURE_TYPE , int x, int y);
    void removeCreature( int x, int y );
    void moveCreature( int , int , int , int );
    enum CREATURE_TYPE getCreature( int x, int y);

private:
    static const int height = 20;
    static const int width = 35;

    int _max_times;
    int _pass_times;

    RandomNum *random;

    Creature *_p_world[width][height];


};
#endif

